<?php
use think\facade\Route;

// 产品管理资源路由
Route::resource('product', 'product.Index')
    ->only(['index', 'save', 'update', 'delete'])
    ->pattern(['id' => '\d+']);

// 产品分类资源路由
Route::resource('product/category', 'product.Category')
    ->only(['index', 'save', 'update', 'delete'])
    ->pattern(['id' => '\d+']);

// 产品单位资源路由
Route::resource('product/units', 'product.Units')
    ->only(['index', 'save', 'update', 'delete'])
    ->pattern(['id' => '\d+']);